function Remove-Host
{
	param([string]$hostName)

	$hostsContent = (get-content ($env:windir + "\System32\drivers\etc\hosts"))

	$hostEntry = select-string "$hostName" ($env:windir + "\System32\drivers\etc\hosts")

	if ($hostEntry -is [object]) 
	{ 
		$hostsContent -replace "127.0.0.1   $hostName", "" | set-content ($env:windir + "\System32\drivers\etc\hosts")
	}	
}

Remove-Host www.litwarehr.com
Remove-Host www.litware.com
Remove-Host services.litwarehr.com
Remove-Host www.contoso.com
Remove-Host www.fabrikam.com
